<h1>People</h1>
<div class="well">
<%= link_to "New Person", new_person_path, class: "btn btn-primary" %>
</div>
<table class="table table-bordered table-striped">
  <thead>
    <tr>
      <th>Name</th>
      <th>Number of Interactions</th>
      <th>&nbsp;</th>
    </tr>
  </thead>
  <tbody>
    <% if @people.count == 0 %>
      <tr>
        <td colspan="3">
          No people found.  Click the button above to add a new one.
        </td>
      </tr>
    <% else %>
      <% @people.each do |person| %>
        <tr>
          <td><%= link_to "#{person.first_name} #{person.last_name}", person %></td>
          <td><%= person.interactions.count %></td>
          <td><%= link_to "Edit", edit_person_path(person), class: "btn btn-default" %></td>
        </tr>
      <% end %>
    <% end %>
  </tbody>
</table>
